package com.hongxun.modules.api.service.impl;

import java.util.UUID;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

import com.hongxun.modules.api.dao.BDeviceDao;
import com.hongxun.modules.api.entity.BDeviceEntity;
import com.hongxun.modules.api.service.BDeviceService;



@Service("bDeviceService")
public class BDeviceServiceImpl implements BDeviceService {
	@Autowired
	private BDeviceDao bDeviceDao;
	
	@Override
	public BDeviceEntity queryObject(String guid){
		return bDeviceDao.queryObject(guid);
	}
	
	@Override
	public List<BDeviceEntity> queryList(Map<String, Object> map){
		return bDeviceDao.queryList(map);
	}
	
	@Override
	public int queryTotal(Map<String, Object> map){
		return bDeviceDao.queryTotal(map);
	}
	
	@Override
	public void save(BDeviceEntity bDevice){
		bDevice.setGuid(UUID.randomUUID().toString());
		bDeviceDao.save(bDevice);
	}
	
	@Override
	public void update(BDeviceEntity bDevice){
		bDeviceDao.update(bDevice);
	}
	
	@Override
	public void delete(String guid){
		bDeviceDao.delete(guid);
	}
	
	@Override
	public void deleteBatch(String[] guids){
		bDeviceDao.deleteBatch(guids);
	}
	@Override
	public List<BDeviceEntity> queryForBigtype(){
		return bDeviceDao.queryForBigtype();
	}


	@Override
	public List<BDeviceEntity> queryForMidtype(String bigtype){
		return bDeviceDao.queryForMidtype(bigtype);
	}

}
